/*
 * Copyright (c) 2006-2020, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2020-05-21     chenhy       the first version
 */
#include "board.h"
#include "mem.h"
#include <stdint.h>
#include <string.h>
unsigned char ram_space[RAM_FIELD_SIZE];

int32_t ram_write(uint32_t address, void* pbuf, int32_t size)
{
  memcpy(&ram_space[address-RAM_FIELD_START], pbuf, size);
  return size;
}

int32_t ram_read(uint32_t address, void* pbuf, int32_t size)
{
  memcpy(pbuf, &ram_space[address-RAM_FIELD_START], size);
  return size;
}
